package com.zikao.article.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zikao.common.utils.PageUtils;
import com.zikao.article.entity.ArticleEntity;
import com.zikao.user.entity.UserEntity;

import java.util.List;
import java.util.Map;

/**
 * @author likaisheng
 * @email 1805318928@qq.com
 * @date 2021-02-21 10:55:38
 */
public interface ArticleService extends IService<ArticleEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 支持动态查询的分页
     * @param params
     * @param queryWrapper
     * @return
     */
    PageUtils queryPage(Map<String, Object> params,Wrapper queryWrapper);

    List<ArticleEntity> selectByMap(Map<String, Object> params);

    List<ArticleEntity> selectList(Wrapper queryWrapper);

    void saveArticle(ArticleEntity article);

    /**
     * 根据id获取文章，并关联获取标签等相关信息
     * @param id
     * @return
     */
    ArticleEntity getArticleById(Long id);

    List<ArticleEntity> selectBatchIds(List<Long> articleIds);

    void updateArticleById(ArticleEntity article);
}

